using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Error : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        if (!IsPostBack)
        {
            try
            {

                if (Application["errorPage"] != null)
                {

                    LabelErrorPage.Text = Application["errorPage"].ToString();
                }

                if (Application["errorMsg"] != null)
                {

                    LabelErrorMsg.Text = Application["errorMsg"].ToString();
                }
                string date = DateTime.Now.ToString("yyyy-MM-dd");
                WriterLog log = new WriterLog(Server.MapPath(@"./log/error_" + date + ".log"));
                log.WriterError(Application["errorPage"].ToString(), Application["errorMsg"].ToString());
            }
            catch { }
        }



    }
}
